/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package tp_imag.model;

import ij.process.ByteProcessor;
import java.awt.image.BufferedImage;

/**
 *
 * @author gdenari
 */
public class ActualImage {
    
    private static ActualImage _instance = null;

    private String path;
    private BufferedImage original = null;
    private BufferedImage filtered = null;
    private BufferedImage binarized = null;
    private BufferedImage vectorized = null;

    private ByteProcessor originalBP = null;
    private ByteProcessor filteredBP = null;
    private ByteProcessor binarizedBP = null;
    private ByteProcessor vectorizedBP = null;

    /* Indica si la foto esta en modo EDIT (viene de la carga masiva) o en modo
     comparacion de imagenes */
    private boolean editMode = false;

    /* Informacion de la imagen que se esta editando*/
    private ImageItem imageItem = null;

    public ByteProcessor getBinarizedBP() {
        return binarizedBP;
    }

    public void setBinarizedBP(ByteProcessor binarizedBP) {
        this.binarizedBP = binarizedBP;
    }

    public ByteProcessor getFilteredBP() {
        return filteredBP;
    }

    public void setFilteredBP(ByteProcessor filteredBP) {
        this.filteredBP = filteredBP;
    }

    public ByteProcessor getOriginalBP() {
        return originalBP;
    }

    public void setOriginalBP(ByteProcessor originalBP) {
        this.originalBP = originalBP;
    }

    public ByteProcessor getVectorizedBP() {
        return vectorizedBP;
    }

    public void setVectorizedBP(ByteProcessor vectorizedBP) {
        this.vectorizedBP = vectorizedBP;
    }


    private ActualImage() {
    }

    public static ActualImage getInstance() {
        if (_instance == null) {
            _instance = new ActualImage();
        }
        return _instance;
    }

    public BufferedImage getBinarized() {
        return binarized;
    }

    public BufferedImage getFiltered() {
        return filtered;
    }

    public BufferedImage getOriginal() {
        return original;
    }

    public void setBinarized(BufferedImage binarized) {
        this.binarized = binarized;
    }

    public void setFiltered(BufferedImage filtered) {
        this.filtered = filtered;
    }

    public void setOriginal(BufferedImage original) {
        this.original = original;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public void setVectorized(BufferedImage vectorized){
        this.vectorized = vectorized;
    }

    public BufferedImage getVectorized() {
        return vectorizedBP.getBufferedImage();
    }

    public boolean isEditMode() {
        return editMode;
    }

    public void setEditMode(boolean editMode) {
        this.editMode = editMode;
    }

    public ImageItem getImageItem() {
        return imageItem;
    }

    public void setImageItem(ImageItem imageItem) {
        this.imageItem = imageItem;
    }



}
